Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MODEXPS-273] Improve logging for job launching process #610

Merged
merged 25 commits into from
Dec 30, 2024

Conversation

Saba-Zedginidze-EPAM
Copy link
Contributor

@Saba-Zedginidze-EPAM Saba-Zedginidze-EPAM commented Dec 24, 2024

Purpose

https://folio-org.atlassian.net/browse/MODEXPS-273

Approach

  • Improve logging and validation logic for export job
  • Fetch Claim Sent pieces instead of Late for CLAIMS export
  • Conditionally trigger Ftp/Minio steps for CLAIMS
  • Do not download file content in Ftp step, fetch it from the memory
  • Remove Export History step for CLAIMS

@BKadirkhodjaev BKadirkhodjaev requested a review from a team December 26, 2024 07:58
var ediExportConfig = ediObjectMapper.readValue((String)jobParameters.get(EDIFACT_ORDERS_EXPORT), VendorEdiOrdersExportConfig.class);
var edifactOrderAsString = (String) ExecutionContextUtils.getExecutionVariable(stepExecution,"edifactOrderAsString");
var ediExportConfig = ediObjectMapper.readValue((String) jobParameters.get(EDIFACT_ORDERS_EXPORT), VendorEdiOrdersExportConfig.class);
if (ediExportConfig.getIntegrationType() != ORDERING && ediExportConfig.getTransmissionMethod() != FILE_DOWNLOAD) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to minio we should save in any case for both transition methods: File download, and FTP.
We will upload that file into Minio and after this will transfer to Ftp if transitionMethod is Ftp.
But it is required to have file in Minio in any case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, will modify, but we still can probably skip the step to download it from minio for FTP upload and just read it from the memory

var ediExportConfig = ediObjectMapper.readValue((String)jobParameters.get(EDIFACT_ORDERS_EXPORT), VendorEdiOrdersExportConfig.class);
var uploadedFilePath = (String) ExecutionContextUtils.getExecutionVariable(stepExecution, UPLOADED_FILE_PATH);
var ediExportConfig = ediObjectMapper.readValue((String) jobParameters.get(EDIFACT_ORDERS_EXPORT), VendorEdiOrdersExportConfig.class);
if (ediExportConfig.getIntegrationType() != ORDERING && ediExportConfig.getTransmissionMethod() != FTP) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit hard to read with inverse conditions. Also having integration type here will lead us to modify source code of tasklet during adding new integration type. If we could not do such inverse configuration on some higher config level - we can leave as it.

@Saba-Zedginidze-EPAM Saba-Zedginidze-EPAM merged commit be2e1cb into master Dec 30, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants